public class Leijia2{

	public static void main(String[] args){
	
		int sum = 0;
		int i = 0;
		while (i < 100){
			i++;
		if( i % 10 == 3){			
			continue;							
		}
		sum = sum + i;		
		}
		System.out.println(sum);
		}

}